package com.wwg.market.ui.service.dto;

import java.util.List;

/**
 * Created by IntelliJ IDEA.
 *
 * @author gaoyang
 * @version $Id: $
 * @date 11-12-15 下午10:54
 */
public class GeneralCodeDto extends BaseDto {
    private Long parent;
    private String name;
    private String code;
    private String description;
    private int order; //排序
    private List<GeneralCodeDto> children;


    public Long getParent() {
        return parent;
    }

    public void setParent(Long parent) {
        this.parent = parent;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public int getOrder() {
        return order;
    }

    public void setOrder(int order) {
        this.order = order;
    }

    public List<GeneralCodeDto> getChildren() {
        return children;
    }

    public void setChildren(List<GeneralCodeDto> children) {
        this.children = children;
    }

    @Override
    public String toString() {
        int size = children != null ? children.size() : 0;

        return "GeneralCodeDto{" +
                "id=" + super.id +
                ",parent=" + parent +
                ", name='" + name + '\'' +
                ", code='" + code + '\'' +
                ", description='" + description + '\'' +
                ", children size =" + size +
                ", order=" + order +
                '}';
    }
}
